package dao

import (
	"time"
)

// 这是 FileChunk 的全局公开dao对象
var FileChunkDao = fileChunkDao{}

// 这是 file_chunk表 的实体类
type FileChunk struct {
	Id        int       `json:"id" form:"id" binding:"id"`
	CreatedAt time.Time `json:"created_at" form:"created_at" binding:"created_at"`
	UpdatedAt time.Time `json:"updated_at" form:"updated_at" binding:"updated_at"`
	DeletedAt time.Time `json:"deleted_at" form:"deleted_at" binding:"deleted_at"`
	FileId    int       `json:"file_id" form:"file_id" binding:"file_id"`
	Number    int       `json:"number" form:"number" binding:"number"` // file_chunk的数量
	Path      string    `json:"path" form:"path" binding:"path"`       // file_chunk的路径

}

// 注意:这是 FileChunk 的私有dao对象
type fileChunkDao struct {
	Obj    FileChunk
	Insert func(arg FileChunk) int       //插入一条记录
	Update func(arg FileChunk) int       //更新一条记录
	Delete func(arg FileChunk) int       //删除一条记录
	Select func(arg FileChunk) FileChunk //获取一条记录
}
